//package com.sf.config;
//
//import com.sf.interceptor.CheckLoginInterceptor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//@Configuration
//public class MvcConfig implements WebMvcConfigurer {
//
//    @Autowired
//    private CheckLoginInterceptor checkLoginInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        //1 把拦截器交给 springmvc 来管理 2,配置拦截规则   3，配置排除规则
//        registry.
//                addInterceptor(checkLoginInterceptor).
//                addPathPatterns("/**").           //拦截规则   全拦截
//                excludePathPatterns("/login.html","/login");    //排除规则  登录的接口
//    }
//}
